package com.errol.batchprocessor.employeeaddition.advisorimpl.common.payload;

import lombok.Getter;

/**
 * 人员导入过程中的统计项
 *
 * @author zhang xiao bin
 * @version v1.0
 * @date 2021/03/15
 * @since v5.0.6
 **/
@Getter
public class EmployeeAdditionCountPayload {

    /**
     * 验证通过的数据
     */
    private int verifyPassCount;
    /**
     * 添加 employee 的数量
     */
    private int addEmployeeCount;
    /**
     * 添加 employeeCustomer 的数量
     */
    private int addEmployeeCustomerCount;
    /**
     * 添加 userBank 的数量
     */
    private int addBankCardCount;
    /**
     * 添加 agreementDetail 的数量
     */
    private int addAgreementCount;
    /**
     * 调用 三要素 接口的数量
     */
    private int threeElementCount;
    /**
     * 调用 银行卡信息 接口的数量
     */
    private int bankInfoCount;
    /**
     * 一条记录开始执行的时间，用于判断是否新增用户相关记录
     */
    private long timestamp;

    public EmployeeAdditionCountPayload() {
        this.verifyPassCount = 0;
        this.addEmployeeCount = 0;
        this.addEmployeeCustomerCount = 0;
        this.addBankCardCount = 0;
        this.addAgreementCount = 0;
        this.threeElementCount = 0;
        this.bankInfoCount = 0;
    }

    public void addUpVerifyPassCount() {
        this.verifyPassCount++;
    }

    public void addUpAddEmployeeCount() {
        this.addEmployeeCount++;
    }

    public void addUpAddEmployeeCustomerCount() {
        this.addEmployeeCustomerCount++;
    }

    public void addUpAddBankCardCount() {
        this.addBankCardCount++;
    }

    public void addUpAddAgreementCount() {
        this.addAgreementCount++;
    }

    public void addUpThreeElementCount() {
        this.threeElementCount++;
    }

    public void addUpBankInfoCount() {
        this.bankInfoCount++;
    }

    public void setTimestamp() {
        this.timestamp = System.currentTimeMillis();
    }
}
